package com.example.demo.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserMapper {
	
	/**
	 * 获得密码
	 * 
	 * @param username 用户名
	 */
	@Select(value = "SELECT password FROM user WHERE username = #{username}")
	String getPassword(String username);

	/**
	 * 获得角色权限
	 * 
	 * @param username 用户名
	 * @return user/admin
	 */
	@Select(value = "SELECT role FROM user WHERE username = #{username}")
	String getRole(String username);
}
